namespace IrisGenerator.Dal {
    using System;
    using System.Collections.Generic;
    using System.Data.SqlClient;
    using System.Configuration;
    using System.Data;
    using System.Xml;
    
    
    public partial class FormaterConfiguration : IDisposable {
        
        private DataAccess _dataAccess;
        
        public FormaterConfiguration() {
            this._dataAccess = new DataAccess();
        }
        
        public virtual System.Data.DataSet Select_FORMATER_CONFIGURATION_By_CAS_ID(System.Nullable<System.Guid> CAS_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_FORMATER_CONFIGURATION_By_CAS_ID");
            this._dataAccess.AddParameter("CAS_ID", CAS_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet Select_FORMATER_CONFIGURATION_By_FOR_ID(System.Nullable<System.Guid> FOR_ID) {
            this._dataAccess.CreateProcedureCommand("sp_Select_FORMATER_CONFIGURATION_By_FOR_ID");
            this._dataAccess.AddParameter("FOR_ID", FOR_ID, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet FORMATER_CONFIGURATION_Select_All() {
            this._dataAccess.CreateProcedureCommand("sp_FORMATER_CONFIGURATION_Select_All");
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual System.Data.DataSet FORMATER_CONFIGURATION_Select_One(string FOR_CON_CONFIG_KEY) {
            this._dataAccess.CreateProcedureCommand("sp_FORMATER_CONFIGURATION_Select_One");
            this._dataAccess.AddParameter("FOR_CON_CONFIG_KEY", FOR_CON_CONFIG_KEY, ParameterDirection.Input);
            DataSet value = this._dataAccess.ExecuteDataSet();
            return value;
        }
        
        public virtual void FORMATER_CONFIGURATION_Insert(string FOR_CON_CONFIG_KEY, System.Nullable<System.Guid> CAS_ID, System.Nullable<System.Guid> FOR_ID, string FOR_CON_PREFIX, string FOR_CON_SUFFIX) {
            this._dataAccess.CreateProcedureCommand("sp_FORMATER_CONFIGURATION_Insert");
            this._dataAccess.AddParameter("FOR_CON_CONFIG_KEY", FOR_CON_CONFIG_KEY, ParameterDirection.Input);
            this._dataAccess.AddParameter("CAS_ID", CAS_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_ID", FOR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_CON_PREFIX", FOR_CON_PREFIX, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_CON_SUFFIX", FOR_CON_SUFFIX, ParameterDirection.Input);
            this._dataAccess.ExecuteNonQuery();
        }
        
        public virtual System.Nullable<int> FORMATER_CONFIGURATION_Delete(string FOR_CON_CONFIG_KEY) {
            this._dataAccess.CreateProcedureCommand("sp_FORMATER_CONFIGURATION_Delete");
            this._dataAccess.AddParameter("FOR_CON_CONFIG_KEY", FOR_CON_CONFIG_KEY, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual System.Nullable<int> FORMATER_CONFIGURATION_Update(string FOR_CON_CONFIG_KEY, System.Nullable<System.Guid> CAS_ID, System.Nullable<System.Guid> FOR_ID, string FOR_CON_PREFIX, string FOR_CON_SUFFIX) {
            this._dataAccess.CreateProcedureCommand("sp_FORMATER_CONFIGURATION_Update");
            this._dataAccess.AddParameter("FOR_CON_CONFIG_KEY", FOR_CON_CONFIG_KEY, ParameterDirection.Input);
            this._dataAccess.AddParameter("CAS_ID", CAS_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_ID", FOR_ID, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_CON_PREFIX", FOR_CON_PREFIX, ParameterDirection.Input);
            this._dataAccess.AddParameter("FOR_CON_SUFFIX", FOR_CON_SUFFIX, ParameterDirection.Input);
            int value = this._dataAccess.ExecuteNonQuery();
            return value;
        }
        
        public virtual void Dispose() {
            if ((this._dataAccess != null)) {
                this._dataAccess.Dispose();
            }
        }
    }
}
